package com.temi.iot.jwt;


import com.temi.iot.jwt.model.TokenValue;
import com.temi.iot.util.SpringContextHolder;

/**
 * token接口
 *
 * @author sheng
 * @date 17/12/5.
 */
public interface TokenInterface {

    TokenInterface TOKEN = SpringContextHolder.getBean(TokenInterface.class);

    /**
     * 获取token
     */
    String getToken(TokenValue tokenValue) throws Exception;

    /**
     * 验证token
     */
    TokenValue verifyToken(String authorization) throws Exception;

    /**
     * 删除token
     */
    void remove(String authorization) throws Exception;

}
